// DevStudioUIDemoView.cpp : implementation of the CDevStudioUIDemoView class
//

#include "stdafx.h"
#include "DevStudioUIDemo.h"

#include "DevStudioUIDemoDoc.h"
#include "DevStudioUIDemoView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDevStudioUIDemoView

IMPLEMENT_DYNCREATE(CDevStudioUIDemoView, CHtmlView)

BEGIN_MESSAGE_MAP(CDevStudioUIDemoView, CHtmlView)
	//{{AFX_MSG_MAP(CDevStudioUIDemoView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CHtmlView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CHtmlView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CHtmlView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDevStudioUIDemoView construction/destruction

CDevStudioUIDemoView::CDevStudioUIDemoView()
{
	// TODO: add construction code here

}

CDevStudioUIDemoView::~CDevStudioUIDemoView()
{
}

BOOL CDevStudioUIDemoView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CHtmlView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CDevStudioUIDemoView drawing

void CDevStudioUIDemoView::OnDraw(CDC* pDC)
{
	CDevStudioUIDemoDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CDevStudioUIDemoView printing

BOOL CDevStudioUIDemoView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CDevStudioUIDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CDevStudioUIDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CDevStudioUIDemoView diagnostics

#ifdef _DEBUG
void CDevStudioUIDemoView::AssertValid() const
{
	CHtmlView::AssertValid();
}

void CDevStudioUIDemoView::Dump(CDumpContext& dc) const
{
	CHtmlView::Dump(dc);
}

CDevStudioUIDemoDoc* CDevStudioUIDemoView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDevStudioUIDemoDoc)));
	return (CDevStudioUIDemoDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CDevStudioUIDemoView message handlers

void CDevStudioUIDemoView::OnInitialUpdate() 
{
	//TODO: This code navigates to a popular spot on the web.
	//Change the code to go where you'd like.
	LoadFromResource( IDR_WHATS_NEW );
}
